Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add boolean operator filters #85

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

TetraTsunami
Copy link
Member

@TetraTsunami TetraTsunami commented Nov 24, 2024

Close #78
Implements three new filters, AND, OR, and NOT, which themselves can contain filters. They manipulate the operations of their contained filters and combine them in different ways before passing them to the broader filter system.

  • Extract filter reducer to duplicate it in the AND, OR, NOT filters
  • Implement AND, OR, NOT filters
    • Add them to the AddFilter component (also add descriptions to explain what they do)
    • Store states of filters in their reducers instead of useState (if they're in the popup they would get clobbered)

Essentially, when the BoolFilter popup closes, the filters inside of it are destroyed, which drops their state. By storing the state inside the dispatch object, it isn't dependent on the component anymore.
Copy link

Visit the preview URL for this PR (updated for commit e36a081):

https://red-coral-map--pr85-tetratsunami-boolean-7ftzq5vp.web.app

(expires Sun, 01 Dec 2024 23:51:37 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 448fecd22aac1efe5f83b62a6963333ee67c448b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filters: NOT and OR
1 participant